//
// Created by xili on 2024/8/22 11:01.
// GO BIG OR GO HOME.
//
#include "leetcode.h"

class Solution {
public:
    int countTestedDevices(vector<int> &batteryPercentages) {
        int count = 0;
        int n = batteryPercentages.size();
        for (int i = 0; i < n; i++) {
            if (batteryPercentages[i] - count) {
                count++;
            }
        }
        return count;
    }
};